Information processing apparatus, method of controlling information processing apparatus, and non-transitory computer-readable storage medium

ABSTRACT

An information processing apparatus comprising a setting unit configured to set a plurality of areas for detecting an object in a moving image, a detection unit configured to analyze the moving image and detect an object, a determination unit configured to determine a stay time for which the object has stayed within the area on the basis of a result of detecting the object in the moving image, a specifying unit configured to, when the same object has been detected in a plurality of the areas by the detection unit, specify an area, among the plurality of areas, to be associated with the stay time, on the basis of a predetermined condition, and an output unit configured to output information in which the area specified by the specifying unit and the stay time are associated with each other.

BACKGROUND OF THE INVENTION Field of the Invention

The present disclosure relates to an information processing apparatus, amethod of controlling an information processing apparatus, and anon-transitory computer readable storage medium.

Description of the Related Art

Images shot by surveillance cameras, images stored in storage devicesafter being shot, and the like are increasingly being analyzed andutilized. For example, human body detection and human body trackingtechniques can be used to count the number of people in an area, thenumber of people who have crossed a line, and so on. This makes itpossible to understand the state of the activities of people in aspecific area, and in particular the amount of time for which the peopleremain in the specific area. Japanese Patent Laid-Open No. 2015-69639and Japanese Patent Laid-Open No. 2017-182654 disclose inventions whichmeasure the amount of time a person stays (the stay time) within aspecific area.

However, if areas are set for each of predetermined locations wherepeople are helped, such as a single reception desk, and the stay timesfor which the people stay within the areas are measured, a person may bedetected within a plurality of areas. Situations are also conceivablewhere a person temporarily enters, exits from, or passes through adifferent area. Such cases require a technique for measuring the staytime as a stay time in a specific areas associated with a reception deskestimated to be used by the person.

SUMMARY OF THE INVENTION

A technique is provided which makes it possible to measure a stay timefor which a subject detected within an image is associated with aspecific area.

One aspect of exemplary embodiments relates to an information processingapparatus comprising a setting unit configured to set a plurality ofareas for detecting an object in a moving image, a detection unitconfigured to analyze the moving image and detect an object, adetermination unit configured to determine a stay time for which theobject has stayed within the area on the basis of a result of detectingthe object in the moving image, a specifying unit configured to, whenthe same object has been detected in a plurality of the areas by thedetection unit, specify an area, among the plurality of areas, to beassociated with the stay time, on the basis of a predeterminedcondition, and an output unit configured to output information in whichthe area specified by the specifying unit and the stay time areassociated with each other.

Further features of the invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a diagram illustrating an example of a system configurationaccording to an exemplary embodiment.

FIG. 1B is a diagram illustrating an example of the hardwareconfiguration of an image processing apparatus according to an exemplaryembodiment.

FIG. 2 is a diagram illustrating an example of the functionalconfiguration of an image processing apparatus according to an exemplaryembodiment.

FIG. 3 is a diagram illustrating a method for setting determinationareas according to an exemplary embodiment.

FIG. 4 is a flowchart illustrating an example of processing according toan exemplary embodiment.

FIG. 5 is a diagram illustrating an example of a table in whichmeasurement results are registered, according to an exemplaryembodiment.

FIG. 6A is a diagram illustrating an example of a human body movingbetween two determination areas set adjacent to each other, as relatedto a stay-unit adjustment process according to an exemplary embodiment.

FIG. 6B is a diagram of a table 610 illustrating an example ofmeasurement results obtained for a human body in a use case 600,according to an exemplary embodiment.

FIG. 6C is a diagram illustrating an example of a table 620 in whichstay times having the same tracking IDs 613 have been extracted from thetable 610, according to an exemplary embodiment.

FIG. 6D is a diagram illustrating an example of a table 630 showing asingle stay-unit obtained by adjusting the stay time on the basis of aselected stay-unit and integrating a plurality of stay-units, accordingto an exemplary embodiment.

FIG. 7 is a flowchart illustrating an example of a stay-unit adjustmentprocess according to an exemplary embodiment.

FIG. 8A is a diagram illustrating an example of a human body moving inand out of a single determination area, as related to a stay-unitadjustment process according to an exemplary embodiment.

FIG. 8B is a diagram illustrating an example of a table 810 showing anexample of detection results obtained for a human body in a use case800, according to an exemplary embodiment.

FIG. 8C is a diagram illustrating a stay-unit obtained by integratingtwo stay-units 811 and 813 when a human body is staying in adetermination area A801, according to an exemplary embodiment.

FIG. 9 is a flowchart illustrating an example of a stay-unit adjustmentprocess according to an exemplary embodiment.

FIG. 10 is a diagram illustrating yet another example of a stay-unitadjustment process according to an exemplary embodiment.

FIG. 11 is a flowchart illustrating yet another example of a stay-unitadjustment process according to an exemplary embodiment.

DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments will be described next with reference to thedrawings. It should be noted that the configurations described in thefollowing embodiments are merely examples, and that the invention is notintended to be limited to the configurations described therein andillustrated in the drawings.

First Embodiment

A system configuration according to an exemplary embodiment will bedescribed with reference to FIG. 1A. FIG. 1A is a block diagramillustrating an example of the configuration of an image processingsystem 10 according to the present embodiment. The image processingsystem 10 is configured by connecting at least one image capturingdevice (network camera) 110 with an image processing apparatus 120 overa network 130.

The image capturing device 110 is a surveillance camera installed in amonitored zone such as a store, a theater, a movie theater, or astadium. The image capturing device 110 is installed so as to shoot apredetermined area in the monitored zone (a monitored area), and has afunction for delivering shot images (moving images, still images) to theimage processing apparatus 120 over the network 130. A plurality of theimage capturing devices 110 may be prepared and installed to shoot aplurality of corresponding monitored areas within the monitored zone.

The image capturing device 110 generates an image by shooting themonitored area within the monitored zone. The image capturing device 110A/D converts an analog image signal, which has been obtained throughphotoelectric conversion using an image sensor such as a CCD or a CMOSimage sensor, into a digital image signal. The digital image signal issubjected to developing processing such as de-Bayering, white balanceprocessing, tone conversion processing, and the like. The digital imagesignal output from a development processing unit is furthermorecompressed and encoded to generate image data. The image compressionmethod can employ a standard such as H.264, H.265, MJPEG, JPEG, or thelike. The image data may furthermore be generated in any desired format,including mp4, avi, or the like. The encoded image data is delivered tothe image processing apparatus 120. In addition to still images, theimage capturing device 110 can, for example, obtain a predeterminednumber of frames per second (e.g., 30 frames) of an image to obtain a30-fps moving image (live video) of the monitored area.

The image processing apparatus 120 can be realized by an informationprocessing apparatus, a communication apparatus, a control apparatus, orthe like, such as a personal computer, a server, a tablet, or the like.The image processing apparatus 120 can communicate with the imagecapturing device 110 over the network 130 and control the operations ofthe image capturing device 110. For example, requests can be made forchanging the shooting direction and image quality settings of the imagecapturing device 110, carrying out PTZ control, and the like. Movingimages and still images captured by the image capturing device 110 canbe received over the network 130. Instead of being realized by a singleapparatus, the functions of the image processing apparatus 120 may berealized by a plurality of apparatuses operating cooperatively.

The image processing apparatus 120 may send settings for determinationareas (described later), image capturing control commands, and the liketo the image capturing device 110. The image capturing device 110 sendsresponses to those commands to the image processing apparatus 120. Theimage processing apparatus 120 sets determination areas (describedlater), makes settings pertaining to processing such as determinationprocessing and output processing, and so on for the obtained imageinformation.

The network 130 can be constituted by a Local Area Network (LAN).However, the network 130 is not limited to a LAN, and may be theInternet, a Wide Area Network (WAN), or the like. The physical format ofthe connection to the network 130 may be a wired connection or awireless connection. Furthermore, although one each of the imagecapturing device 110 and the image processing apparatus 120 areconnected to the network 130 in FIG. 1A, the number of connected devicesis not limited to the number illustrated in FIG. 1A, and more devicesmay be connected.

Next, the hardware configuration of the image processing apparatus 120will be described with reference to FIG. 1B. FIG. 1B is a block diagramillustrating an example of the hardware configuration of the imageprocessing apparatus 120 according to this exemplary embodiment. Theconfiguration illustrated in FIG. 1B is merely an example of theconfiguration of the image processing apparatus 120, and can be modifiedor changed as appropriate.

A CPU 121 executes processes using computer programs, data, and the likestored in a main storage unit 122. As a result, the CPU 121 controls theoperations of the image processing apparatus 120 as a whole, andexecutes the various processes carried out by the image processingapparatus 120 (mentioned later). The CPU 121 realizes the functionsdescribed later by executing processes using computer programs, data,and the like stored in the main storage unit 122. The main storage unit122 is a storage device such as Random Access Memory (RAM). The mainstorage unit 122 has an area for storing computer programs, data, andthe like loaded from an auxiliary storage unit 123, various types ofdata and images received from the image capturing device 110 through anetwork I/F 126 or obtained from files, and so on. The main storage unit122 further includes a work area used by the CPU 121 when executingvarious processes. In this manner, the main storage unit 122 can providevarious types of areas as appropriate.

The auxiliary storage unit 123 is a high-capacity information storagedevice such as a Hard Disk Drive (HDD), Read-Only Memory (ROM), or aSolid State Drive (SSD). An operating system (OS), computer programs forcausing the CPU 121 to execute the processes carried out by the imageprocessing apparatus 120 (described later), data, and the like arestored in the auxiliary storage unit 123. Various types of data andcaptured images received from the image capturing device 110 through anetwork I/F 126, images obtained from another external device connectedto the network 130 (an image server or the like), and so on are alsostored in the auxiliary storage unit 123. The computer programs, data,and the like stored in the auxiliary storage unit 123 are loaded intothe main storage unit 122 as appropriate under the control of the CPU121, and are then processed by the CPU 121.

An input unit 124 is constituted by a user interface such as a keyboard,a mouse, a touch panel, or the like, and can input various types ofinstructions to the image processing apparatus 120 by being operated bya user of the image processing apparatus 120. A display unit 125 isconstituted by a liquid crystal screen or the like, and is capable ofdisplaying the results of processes performed by the image processingapparatus 120 as images, graphics, text, or the like. The network I/F126 is an interface used by the image processing apparatus 120 for datacommunication with the image capturing device 110 over the network 130.

Although FIG. 1B illustrates the image processing apparatus 120 as asingle apparatus including the input unit 124 and the display unit 125,the input unit 124 and the display unit 125 may be provided as unitsseparate from the image processing apparatus 120. Alternatively, thedisplay unit 125 may be integrated with the image processing apparatus120, and the input unit 124 may be provided separately. Conversely, theinput unit 124 may be integrated with the image processing apparatus120, and the display unit 125 may be provided separately. Furthermore,the input unit 124 and the display unit 125 may be an integrated unitprovided separate from the image processing apparatus 120. When theinput unit 124 and/or the display unit 125 are units separate from theimage processing apparatus 120, the image processing apparatus 120 canfurther include interface(s) for making connections.

The functional configuration of the image processing apparatus 120corresponding to this exemplary embodiment will be described next withreference to FIG. 2. FIG. 2 is a block diagram illustrating an exampleof the functional configuration of the image processing apparatus 120according to this exemplary embodiment. The functions realized by eachfunction block will be described below.

A communication unit 201 communicates with the image capturing device110 over the network 130. An image obtaining unit 202 obtains an imageobtained from the image capturing device 110 through the communicationunit 201, or an image stored in the auxiliary storage unit 123, as animage to be processed. The image may be a still image or a moving image.The moving image is constituted by a plurality of frame images that arecontinuous (or related) with respect to time, and each frame image (alsocalled simply “images” for the sake of simplicity hereinafter) serves asan image to be processed according to the present embodiment. Theplurality of images continuous with respect to time may be imagesobtained by thinning the frame images in a moving image captured by theimage capturing device 110. For example, one out of every predeterminednumber of frame images in a moving image captured by the image capturingdevice 110 may be obtained and used as the image to be processed.

A human body detecting unit 203 detects a human body (a person), whichis an object, present in the image to be processed by analyzing theimage. Although the present embodiment describes a situation where theobject to be processed is a human body, the object may also includeother tangible objects aside from a human body, such as vehicles or thelike. A human body tracking unit 204 identifies and tracks the samehuman body, among the human bodies detected among a plurality of images(frames) that are continuous with respect to time.

An inside/outside area determination unit 205 carries out aninside/outside area determination, in which it is determined whether agiven person is present inside an area or is present outside the area,on the basis of position information of the detected human body andposition information of a set area. A stay time measurement unit 206measures a stay time, which is the amount of time a human body hasstayed within a set area. The stay time measurement unit 206 holds astay start time, a stay end time, and the stay time, in association withinformation identifying the human body and the area, as a “stay-unit” inthe auxiliary storage unit 123, for each detected human body.

A stay-unit adjustment unit 207 adjusts the stay-unit generated by thestay time measurement unit 206. In the present embodiment, this processwill be called a “stay-unit adjustment process”. The stay-unitadjustment process will be described in detail later. A stay area timedetermination unit 208 determines a determination area in which eachdetected human body stays on the basis of the adjusted stay-unit, anddetermines the stay time. An output unit 209 outputs the stay-unit thathas been adjusted and determined. A display control unit 210 carries outa process for displaying an image obtained from the image capturingdevice 110 through the communication unit 201, or an image stored in theauxiliary storage unit 123, in the display unit 125 via the plurality ofprocessing blocks 202 to 212. When displaying an image, the stay timefor each person can also be displayed, on the basis of the stay-units.The display control unit 210 can display a GUI for accepting operationsfrom the image processing apparatus 120 in the display unit 125.

An input accepting unit 211 imports signals from the input unit 124. Theuser operating the image processing apparatus 120 can operate the GUIdisplayed in the display unit 125 and make inputs through the input unit124. The user can also make area settings (described later) and so onthrough the GUI. An area setting unit 212 sets an area within an imageand holds area setting information pertaining to the set area. The areasetting information of an area that has been set is held until a changeis made thereto.

Based on the above-described configuration, the image processingapparatus 120 carries out processes such as image analysis, settings,measurements, outputs, and the like. An overview of the processingexecuted by the image processing system 10 through the above-describedconfiguration will be described next. First, the image to be processedis analyzed, and the human body serving as the object is detected. If aplurality of human bodies have been detected within the image, thosehuman bodies are identified individually in time series, and the samehuman bodies are tracked (i.e., the trajectories of human bodies movingare tracked from image to image). Furthermore, if an area has been setin the image, the time for which the human body stays in that area ismeasured. The result of this measurement is output as a file or the likealong with time information. At this time, detection information,tracking information, setting information, and the like may be output aswell. One or more of the detection information, information identifyingthe same human body between frames, the setting information, andmeasurement results may be displayed in the display unit 125.

A method for setting a determination area within an image will bedescribed next with reference to FIG. 3. In the present embodiment, theimage processing system 10 is applied at a location where customers arehelped, such as a reception desk, a customer service counter, or a cashregister. Images of the people lined up at the reception desk are shotand the times required to handle those people are measured. Thus in thepresent embodiment, determination areas are set for each individualreception area. For example, in the present embodiment, one of the goalsis to measure, as precisely as possible, the amount of time it takes tohandle each customer being helped as a reception area 304, indicated inFIG. 3. The determination area is set to an area facing the receptionarea 304, as indicated by a determination area 301. The same applieswhen measuring the amount of time it takes to handle each person beinghelped at a reception area 305 and a reception area 306. Thedetermination areas are set, in order, to areas facing the respectivereception areas, as indicated by a determination area 302 and adetermination area 303.

In FIG. 3, the plurality of determination areas set within the image areset so as to be adjacent to each other, as indicated by thedetermination areas 301 to 303. In this case, it is conceivable that ahuman body detected within a given determination area exits the area orenters into another adjacent area in the process of moving within his orher own determination area. Even in such a case, each personcorresponding to a detected human body is positioned in front of thereception area where he or she is being helped, and is not being helpedat the reception area corresponding to the adjacent area he or sheslipped into. Thus even if a human body is temporarily detected in adifferent area or has exited the area he or she originally belongs to,that time can be considered as being included in the time he or she wasbeing helped in the original area. The following embodiment willdescribe a technique in which even if a human body is detected outsideof a specific area, that time can be measured as time spent in thatspecific area.

First, the flow of the overall processing by the image processing system10 will be described with reference to the flowchart in FIG. 4. Thisprocessing is realized by the image processing apparatus 120 reading outa program from the auxiliary storage unit 123 of the image processingapparatus 120 into the main storage unit 122, and the CPU 121 thenexecuting that program.

The image processing apparatus 120 holds information such as the staytime in the auxiliary storage unit 123. The information held includesidentification information for identifying the detected human body, andthe stay time, the stay start time, and the stay end time for eachdetermination area. Together, this information will be called a“stay-unit”. The information of the stay-unit held in the auxiliarystorage unit 123 is used to measure the stay time of the detected humanbody in a determination area. The sequence of this processing will bedescribed in detail below.

In step S401, the area setting unit 212 sets a determination area, forwhich the stay time is to be measured, in the image to be processed,which has been obtained by shooting a monitored zone. Any desired numberof determination areas, i.e., one or more, can be set. Positioninformation of each determination area set in the image is held in theauxiliary storage unit 123. Next, in step S402, the image obtaining unit202 obtains the image to be processed. The image obtaining unit 202obtains the image from the image capturing device 110 through thecommunication unit 201, or obtains an image stored in the auxiliarystorage unit 123. If the image to be processed is a frame image from amoving image, information of the shooting time is associated with eachframe image. The information of the shooting time can be used as thetime information as which the human body was detected in the image to beprocessed. Next, in step S403, the human body detecting unit 203 detectsa human body by analyzing the obtained image to be processed.

Then, in step S404, the human body tracking unit 204 specifies the samehuman body between images consecutive with respect to time on the basisof the position information of the detected human body, which is storedin the auxiliary storage unit 123. Identification information foridentifying the same human body is added to the specified human body andheld in the auxiliary storage unit 123. The same identificationinformation is added to the same human body, and the positioninformation of the human body in frame images that are sequential withrespect to time is associated with that identification information. Thismakes it possible to track the movement of the same human body fromimage to image.

Next, in step S405, the inside/outside area determination unit 205 makesthe inside/outside area determination by obtaining the positioninformation of the detected human body and the position information ofthe determination area, held in the auxiliary storage unit 123. Here,whether the detected human body is within the determination area oroutside the determination area can be determined on the basis of whetheror not the position information of the human body is located within therange of the determination area as specified by the position informationof the determination area. If there are a plurality of determinationareas, which determination area the detected human body belongs to isspecified as well. The result of the inside/outside area determinationis held in the auxiliary storage unit 123.

Next, in step S406, the stay time measurement unit 206 obtains the timeinformation of each image, the identification information of the humanbody, and the inside/outside area determination result, which are heldin the auxiliary storage unit 123. The stay time is measured on thebasis of the obtained information. For example, the time at which ahuman body was detected in a given determination area is specified onthe basis of a capturing time for the image in which the human body wasdetected. The time until it is determined that the same human body is nolonger in the same determination area is then measured, and that timecan be taken as the stay time. The start time of the stay timecorresponds to the capturing time of the image in which the human bodywas first detected in the determination area. The end time of the staytime corresponds to the capturing time of the image in which the humanbody which had been continuously detected in the determination area waslast detected. The measured stay time is associated with theidentification information for specifying the human body and theinformation for specifying the area, and is held in the auxiliarystorage unit 123.

The information of the stay time, generated per area and human body,will be called a “stay-unit”. The stay time measurement unit 206 updatesthe information of the same stay-unit while the same human body is beingcontinuously detected within the same determination area. For example,the end time of the stay time is updated to the capturing time of thecurrent image, and the stay time is accordingly updated. If the samehuman body has exited the determination area, a new stay-unit isgenerated and the information thereof is updated. If the human body hasreturned to the determination area, a new stay-unit is once againgenerated and the information of the stay time is updated. As a result,a plurality of stay-units corresponding to the current position aregenerated when the detected human body moves in and out of the area.

In step S407, the stay-unit adjustment unit 207 compares the stay-unitsheld in the auxiliary storage unit 123, and adjusts the stay-units. Forexample, for stay-units generated for the same human body, the stay-unithaving the longest stay time can be selected and the length of the staytime can be adjusted. On the basis of the stay-unit adjusted by thestay-unit adjustment unit 207, the stay area time determination unit 208determines the determination area in which the human body stayed andstay time to be used for a totaling process, an output process, and adisplay process carried out by the output unit 209. The output unit 209may output the selected stay-unit at an appropriate timing. The displaycontrol unit 210 may display information of the stay-unit in addition tothe image. Next, in step S408, the image obtaining unit 202 determineswhether or not there are any unprocessed images. The process returns tostep S402 if there is an unprocessed image. However, if there are nounprocessed images, the process ends.

Next, an example of the data structure in a table in which measurementresults generated on the basis of the processing illustrated in FIG. 4are registered will be described with reference to FIG. 5. FIG. 5 is adiagram illustrating an example of a table in which measurement resultsare registered, according to an exemplary embodiment.

The information in a table 500 is held in the auxiliary storage unit123. The rows in the table 500 indicate stay-units, including the staytime for which the corresponding human body staying in eachdetermination area, for each of the human bodies. A column 501 indicatesthe stay start time of the human body within that determination area. Acolumn 502 indicates the stay end time of the human body within thatdetermination area. In a column 503, human body identificationinformation for uniquely identifying the human body (called a “trackingID”) is registered. A human body detected in the image to be processedcan be uniquely identified throughout a plurality of images using thistracking ID. Columns 504, 505, and 506 indicate stay times for which thehuman body stays in determination areas. The number of determinationareas that can be set need not be limited as long as that number ofareas can be processed. Furthermore, although the stay time is expressedin a format where hours, minutes, and seconds are separated by colons,e.g., “00:03:00”, the stay time is not limited to this display format.The stay time may be displayed in units of seconds, milliseconds, and soon.

The example in FIG. 5 illustrates a case where the detected human bodystays in the same area without leaving that area. In this case, thedifference between a stay start time 611 and a stay end time 612 itselfis the stay time for the corresponding area. However, if areas are setnearby each other, the same human body may be detected in a plurality ofareas.

Accordingly, a stay-unit adjustment process carried out when the samehuman body has been detected in a plurality of areas will be describedwith reference to FIGS. 6A to 6D. This process corresponds to theprocess of step S407 in FIG. 4. In the present embodiment, the stay-unitwith the longest cumulative stay time is selected, under the assumptionthat the human body is being helped at the reception area correspondingto the determination area having the longest cumulative stay time. Thiswill be described in detail below.

FIG. 6A illustrates an example of a human body moving between two setdetermination areas that are adjacent to each other. A use case 600indicates a determination area A601 and a determination area B602, whichare set in a given image to be processed, having been cut out. Thepoints in the determination areas indicate positions of the same humanbody detected throughout a plurality of image frames. The arrowsindicate the direction (path and trajectory) of the movement.

FIG. 6B is a table showing an example of the measurement results for thehuman body indicated in the use case 600. Table 610 shows stayinformation for a situation where the same human body has been detectedin a plurality of areas, as stay-units ordered by time. The informationin the table 610 is held in the auxiliary storage unit 123. Theinformation in the table 610 is information from before the stay-unitadjustment process of step S407 is carried out.

Each row in the table 610 indicates a stay-unit including the stay timeof the human body in each determination area, and the registered itemsare basically the same as those shown in FIG. 5. A column 611 indicatesthe stay start time of the human body within that determination area. Acolumn 612 indicates the stay end time of the human body within thatdetermination area. A column 613 indicates the identificationinformation for identifying the same human body between images that areconsecutive with respect to time. Here, this information is a trackingID. A column 614 indicates the stay time for which the human body staysin the determination area A601. A column 615 indicates the stay time forwhich the human body stays in the determination area B602.

As shown in the table 610, the detected human body stayed in thedetermination area A601 for four minutes, from 16:00:00 to 16:04:00, andthen stayed in the determination area B602 for ten seconds, from16:04:05 to 16:04:15. The human body then returned to the determinationarea A601 and stayed there for two minutes and 20 seconds.

Next, FIG. 6C illustrates a table 620 in which stay times having thesame tracking IDs 613 have been extracted from the table 610. Here, if astay time has been recorded in a plurality of determination areas forthe same human body, the total of the stay times in the determinationareas is found. The length of time for which the human body does notbelong to any of those areas is found as an outside-area cumulative staytime.

A column 621 indicates the identification information of the same humanbody among the frames. Here, this information is the tracking ID. Acolumn 622 indicates the cumulative stay time for the determination areaA601. The stay time for the first time the tracking ID 15 entered adetermination area A is 00:04:00. The stay time for the second time thetracking ID 15 entered the determination area A is 00:02:20. As such,the cumulative stay time for the determination area A is 00:06:20.Likewise, a column 623 indicates the cumulative stay time for thedetermination area B602. The stay time for the tracking ID 15 in adetermination area B is 00:00:10. As such, the cumulative stay time forthe determination area B602 is 00:00:10.

A column 624 indicates the cumulative stay time for which the human bodystayed outside the determination areas, i.e., belonged to neither thedetermination area A601 nor the determination area B602. The stay timesfor the tracking ID 15 outside the determination areas are assumed to bea stay time of 00:00:05 during movement from the determination area A tothe determination area B, and a stay time of 00:00:05 during movementfrom the determination area B to the determination area A. Thus theoutside-area cumulative stay time is 00:00:10.

In the example indicated by the table 620, comparing the cumulative staytime 622 in the determination area A601 and the cumulative stay time 623in the determination area B602 for the human body corresponding to thetracking ID 15 shows that the former is longer, and thus the stay-unitfor the determination area A601 is selected. The outside-area cumulativestay time 624 is not used for the comparison.

FIG. 6D is a diagram illustrating a table 630 showing a single stay-unitobtained by adjusting the stay time on the basis of the aforementionedselected stay-unit and integrating a plurality of stay-units. The staystart time for the first entry into the determination area A601 and thestay end time for the second exit from the determination area A601 aretaken in that order as the stay start time and the stay end time for thetracking ID 15 in the determination area A601. The stay time is found asthe difference between the stay start time and the stay end time, andset to (integrated as) a single stay-unit. From the results of theprocessing based on the table 620, the stay time in the determinationarea A, which has the longest cumulative stay time, is 00:06:40. Thestay time for the determination area B602 is 0. The information frombefore the stay-unit adjustment process, shown in the table 610, isupdated with the stay-unit obtained in this manner.

However, the final result of setting the stay-unit is not limitedthereto. The stay-unit from the first entry into the determination areaA601 and the stay-unit from the second entry may be held separatelyrather than being integrated. If the units are held separately, they maybe held separately if the second stay time is longer than apredetermined amount of time, and integrated if the second stay time isnot longer than the predetermined amount of time. Alternatively, theunits may be held separately if the time stayed outside the area betweenthe first and second times is longer than a predetermined amount oftime. In this manner, when the same human body has stayed in a pluralityof determination areas, the adjustment is carried out on the basis ofthe stay-unit for the determination area having the longest cumulativestay time. Clarifying the determination area having the longestcumulative stay time makes it easy to carry out the determination forspecifying the reception area or the like where the human body wasactually helped.

The flow of the stay-unit adjustment process will be described next withreference to the flowchart in FIG. 7. The processes of steps S701 toS707 are repeated for all human bodies for which the human body trackingin the previous image to be processed has not ended. These are carriedout until the processes of steps S701 to S707 are carried out for allthe human bodies.

In step S702, the stay-unit adjustment unit 207 determines whether ornot a human body tracking process is complete for the human body to beprocessed. This determination can be made when the human body for thedetermination, which had been present in the image to be processedimmediately previous, is no longer in the current image to be processed.Specifically, the stay-unit adjustment unit 207 compares the human bodytracking information held in the auxiliary storage unit 123 with thehuman body tracking information in the current image being processed. Ifthe comparison indicates that the human body is present in the humanbody tracking information that is held but is not present in the currentimage, it can be determined that the tracking of that human body hasended. The process moves to step S703 when it is determined that thehuman body tracking has ended, and to step S707 when it is determinedthat the human body tracking has not ended.

In step S703, the stay-unit adjustment unit 207 obtains the stay-unitsfor the human body being processed, held in the auxiliary storage unit123. Then, the stay times of the stay-units for the same human bodyspecified on the basis of the tracking ID, in the same determinationarea, are added together to find the cumulative stay time. Next, in stepS704, the stay-unit adjustment unit 207 compares the cumulative staytimes of the determination areas, found in step S703. In step S705, thestay-unit adjustment unit 207 selects the stay-unit of the determinationarea having the longest cumulative stay time. Then, in step S706, theother stay-units are integrated with the stay-unit for the determinationarea having the longest cumulative stay time, which was selected in stepS705. The processing described thus far is repeated for all human bodiesdetected in the image to be processed.

According to the present embodiment, the time for which a human bodystays in a set area can be measured at a location where people arehelped, such as a reception desk, a customer service counter, or a cashregister, which makes it possible to accurately measure the time ittakes to help a human body at the reception desk or the like.Furthermore, in the present embodiment, the cumulative stay time isadjusted and the average of the response times at each reception areacan be calculated, which makes it possible to measure the reception arearesponse time per human body in a statistically accurate manner. As aresult, work can be improved and made more efficiently, for example byoptimizing the distribution of personnel.

The foregoing embodiment describes a case where the processing iscarried out on the basis of the length of the cumulative stay time ineach determination area. However, the stay-unit adjustment unit 207 mayalso count the total number of times the same human body is detected ineach determination area, and the stay-unit having the highest number ofdetections within the determination area may be selected, for example.

In the present embodiment, stay-units are held for each determinationarea and for each human body, and the stay times in the determinationareas are compared. The stay-unit having the longest cumulative staytime is selected, and the stay time is then adjusted. As a result, if adetected human body has moved from inside a determination area tooutside the determination area, or into another determination area, thetime for which the human body was located outside the determination areacan be included in the stay time. Additionally, the determination areasassociated with the detected person can be narrowed down to a singledetermination area, which makes it easy to carry out the determinationfor specifying the reception area or the like where the person wasactually helped.

Second Embodiment

A second embodiment will be described next. The present embodimentdescribes another example of the stay-unit adjustment process, for asituation where a human body temporarily moves to another determinationarea or moves outside the determination area. The first embodimentdescribes an example in which the time the human body was in anotherdetermination area is integrated with the stay time for thedetermination area having the longest cumulative stay time. As opposedto this, the present embodiment describes a stay-unit adjustment processfor a situation where the human body has returned to the originaldetermination area from a different determination area within a setamount of time. The “set amount of time” assumes a relatively shortamount of time. The measurement handles such a situation as if the humanbody did not enter a different determination area. This will bedescribed in detail below.

The system configuration and the hardware and software configurations ofthe image processing apparatus 120 according to the present embodimentare the same as those described in the first embodiment with referenceto FIGS. 1A, 1B, and 2, and therefore will not be described here.

A stay-unit adjustment process according to the present embodiment,carried out when the same human body has been detected in a plurality ofareas will be described with reference to FIGS. 8A to 8C. FIG. 8Aillustrates an example of a human body moving out of, and then into, asingle determination area. A use case 800 indicates a determination areaA801 in a given image to be processed, having been cut out. The circularpoints in the determination area indicate positions of the same humanbody detected throughout a plurality of image frames. The arrowsindicate the direction (path and trajectory) of the movement.

A point 802 indicates the position at which a human body is detected ina frame 001-Frame. Points 803 to 806 indicate the positions at which thesame human body is detected in frames 002-Frame to 005-Frame,respectively. Time passes in the order of the frame numbers, asindicated by the arrows in the drawing. In this case, the human body isoutside the determination area A801 at point 804. The human body isinside the determination area A801 at the other points.

FIG. 8B is a table showing an example of the detection results for thehuman body indicated in the use case 800. Table 810 shows stayinformation for a situation where the same human body has temporarilyexited the determination area and then returned, as stay-units orderedby time. The information in the table 810 is held in the auxiliarystorage unit 123. The information in the table 810 is information frombefore the stay-unit adjustment process is carried out.

The rows in the table 810 indicate stay-units, including the stay timefor each human body in each determination area. A column 811 indicatesthe stay-unit for which the human body having the tracking ID 15 staysin the determination area A801. A column 812 indicates the stay-unit forwhich the human body having the tracking ID 15 is outside thedetermination area. A column 813 indicates the stay-unit for which thehuman body having the tracking ID 15 stays in the determination areaA801. In this case, the human body has only stayed outside thedetermination area for ten seconds, i.e., 00:00:10. In the presentembodiment, a case where a human body has temporarily moved outside adetermination area and into a different determination area, or the staytime for which the human body is temporarily outside the determinationarea is less than or equal to a threshold, is treated as if the humanbody did not temporarily exit the determination area. Here, if thethreshold is set to, for example, 20 seconds or less, and the time forwhich the human body exited the determination area is shorter than thethreshold, that time is included in the stay time for the determinationarea A801. At this time, a stay-unit 812 where the human bodytemporarily exited the determination area is deleted, and stay-units 811and 813 from when the human body was in the determination area A801 areintegrated.

A table 820 in FIG. 8C shows a stay-unit obtained by integrating the twostay-units 811 and 813 when the human body is the determination areaA801. In the table 820, the stay start time 821 is the stay start timein row 811. The stay end time 822 is the stay end time in row 813. Thestay time in the determination area A801 is the difference between thestay start time 821 and the stay end time 822. Here, the differencebetween 16:00:00 and 16:05:00, i.e., 00:05:00, is the stay time forwhich the human body having the tracking ID 15 has stayed in thedetermination area A801. In other words, the human body is treated as ifit did not exit the determination area. As a result, a singledetermination area where it is thought that the human body was helpedcan be determined with ease.

Furthermore, even if the human body has temporarily moved to a differentdetermination area or has exited the determination area, that time isadded to the stay time for the determination area where the human bodywas originally staying. Adjusting the stay time so that the human bodyhas continuously stayed in a single determination area makes it easy tocarry out the determination for specifying the reception area or thelike where the human body was actually helped. The time it actually tookto help the human body can also be determined accurately.

The flow of the stay-unit adjustment process according to the presentembodiment will be described next with reference to the flowchart inFIG. 9. The processes of steps S901 to S905 are repeated for the humanbodies for which the human body tracking in the previous image to beprocessed has not ended. These are carried out until the processes ofsteps S901 to S905 are carried out for all the human bodies.

In step S902, the stay-unit adjustment unit 207 determines whether ornot the determination area in which the human body to be processed isstaying in the current image to be processed is the same as thedetermination area the human body was staying in before. Thisdetermination is a process of determining whether or not the human bodyto be processed has exited a determination area he or she was staying inpreviously and then re-entered that determination area. Specifically,the stay-unit of the human body to be processed, which is held in theauxiliary storage unit 123, is obtained and compared with thedetermination area in which the human body is currently staying. If thedetermination area is determined to have been stayed and even just oncebefore, the process moves to step S903, and if not, the process moves tostep S905.

In step S903, the stay-unit adjustment unit 207 finds the differencebetween the stay start time of the stay-unit where the human body iscurrently staying in the determination area, and the stay end time ofthe stay-unit where the human body stayed in the same determinationarea. The difference found here indicates the time for which the humanbody temporarily entered a different determination area or exited thedetermination area. Additionally, this difference can indicate theamount of time for which the human body stayed in both the differentdetermination area and outside the determination area. The difference iscompared with a threshold, and if the difference is less than or equalto the threshold, the process moves to step S904. If the difference isgreater than the threshold, the process moves to step S905. In stepS904, processing is carried out so as to include the calculateddifference in the stay time for the current determination area. This canbe taken as indicating that the human body did not temporarily enter adifferent area. Specifically, stay-units in which the human body stayedin a different area are deleted, and the stay-units from when the humanbody stayed in the original determination area are integrated. Thestay-unit resulting from the integration can be called an “integratedunit”. The stay start time of the stay-unit in which the human bodystayed first can be taken as the stay start time of the integratedstay-unit. Likewise, the stay end time of the stay-unit in which thehuman body stayed last can be taken as the stay end time of theintegrated stay-unit. The stay time of the integrated stay-unitcorresponds to the difference between the stay start time of theintegrated stay-unit and the stay end time of the integrated stay-unit.The processing described thus far is repeated for all human bodiesdetected in the image to be processed.

As described thus far, in the present embodiment, the stay-unit isadjusted in a situation where a human body temporarily moves to adifferent determination area or moves outside the determination area.This adjustment makes it possible to set the stay time as if the humanbody never entered a different determination area. If the amount of timethe human body was temporarily in a difference area is less than orequal to a threshold, that stay time is treated as if the human body wasin the original determination area, and is integrated. Deleting theunnecessary information of temporary exits makes it easy to set a singledetermination area. In other words, the determination for specifying thereception area or the like where the person was actually helped iseasier. Additionally, the difference between the stay start time fromwhen the human body first stayed in the same determination area and thestay end time from when the human body last stayed in the determinationarea is found and integrated as the stay time. As a result, the time forwhich the person was actually helped can be determined accurately.

Third Embodiment

A third embodiment will be described next. When an image of a monitoredzone is captured, there are situations where the human bodies detectedin the determination area include not only a human body staying in thatarea, but also a human body passing through that area. Such a human bodyshould be excluded from the stay time measurement. As such, the presentembodiment describes a stay-unit adjustment process for a human bodypassing through a different determination area.

In the present embodiment, when a human body passes through thedetermination area, the movement speed of the human body is found andcompared with a threshold speed. If the movement speed is less than orequal to the threshold, it is determined that the human body is beinghelped in that determination area. On the other hand, if the movementspeed is higher than the threshold, the human body is treated as havingbeen added to the determination area as opposed to being helped in thedetermination area, and is excluded from the processing. This will bedescribed in detail below.

The system configuration and the hardware and software configurations ofthe image processing apparatus 120 according to the present embodimentare the same as those described in the first embodiment with referenceto FIGS. 1A, 1B, and 2, and therefore will not be described here.

The stay-unit adjustment process according to the present embodimentwill be described next with reference to FIG. 10. FIG. 10 illustrates anexample of a human body moving in and out of two set determination areasthat are adjacent to each other. A use case 1000 indicates adetermination area A1001 and a determination area B1002 in a given imageto be processed, having been cut out. The graphics indicating people inthe determination area indicate positions of the same human bodydetected throughout a plurality of image frames (001-Frame to004-Frame). The dotted lines indicate the path (trajectory) of themovement.

A person graphic 1003 indicates the position of a person detected in aframe 001-Frame. Likewise, person graphics 1004 to 1006 indicate thepositions at which the same person is detected in frames 002-Frame to004-Frame, respectively. The increase in the frame numbers correspondsto the passage of time.

In the example illustrated in FIG. 10, the position of the person 1003detected in the frame 001-Frame is outside the determination area.Thereafter, the same person is detected at the position indicated by aperson graphic 1004 in the determination area B1002 in frame 002-Frame,and is furthermore detected at the positions indicated by persongraphics 1005 and 1006 in the determination area A1001 in frames003-Frame and 004-Frame. At this time, the time required to move fromthe position of the person graphic 1003 to the person graphic 1004 istaken as a time 1. The time required to move from the position of theperson graphic 1004 to the person graphic 1005 is taken as a time 2.Furthermore, the time required to move from the position of the persongraphic 1005 to the person graphic 1006 is taken as a time 3.

Here, for the sake of simplicity, the respective movement times, i.e.,time 1, time 2, and time 3, are assumed to be equal. The distance movedduring time 1 is the longest, the distance moved during time 2 is thesecond-longest, and the distance moved during time 3 is the shortest.Accordingly, the movement speed is highest during time 1, second-highestduring time 2, and lowest during time 3.

For example, if the movement speed during time 3 is slower than thethreshold and the other movement speeds are higher than the threshold,the person can be estimated to be moving toward the determination areaA1001. In this case, it makes sense to measure the time for which theperson stayed in the determination area A1001 as the stay time, andthere is no need to measure the times at the positions indicated by theperson graphics 1003 and 1004. The present embodiment will describe amethod for efficiently measuring the stay time in the determination areaA1001, on the basis of the movement speeds.

Here, the flow of the stay-unit adjustment process according to thepresent embodiment will be described with reference to the flowchart inFIG. 11. The processes of steps S1101 to S1110 are repeated, in timeseries, for each of the human bodies for which the human body trackingin the previous image to be processed has not ended. This is carried outuntil the processes of steps S1101 to S1110 have been carried out forall the human bodies.

In step S1102, the stay-unit adjustment unit 207 confirms whether theresult of the inside/outside area determination for the human body beingprocessed, which is held in the auxiliary storage unit 123, is withinthe determination area. As will be described later, the result of theinside/outside area determination is already held in the auxiliarystorage unit 123, from when the inside/outside area determinationprocess was carried out in step S405 of FIG. 4. If the human body iswithin the determination area, the process moves to step S1103, whereasif the human body is outside the determination area, the process movesto step S1109.

In step S1103, the stay-unit adjustment unit 207 determines whether themovement speed of the human body is less than or equal to the speedthreshold, on the basis of the result of the human body tracking for thehuman body being processed, which is held in the auxiliary storage unit123. The movement speed of the human body has already been held in theauxiliary storage unit 123, when the human body tracking process wascarried out in step S404. If the movement speed of the human body isless than or equal to the threshold, the process moves to step S1104,whereas if the movement speed of the human body is greater than (fasterthan) the threshold, the process moves to step S1106. In step S1104, themovement speed is less than or equal to the threshold, and thus thestay-unit adjustment unit 207 determines that the human body beingprocessed is staying in the current determination area. In step S1105,the stay-unit adjustment unit 207 updates the stay-unit, which has beengenerated or updated on the basis of the previous image to be processedof the human body being processed, to a current stay-unit that reflectsthe current measurement result. If there is no previous stay-unit, a newone is prepared.

In step S1106, the movement speed is higher than the threshold, and thusthe stay-unit adjustment unit 207 determines that the human body beingprocessed is passing through the current determination area. Next, instep S1107, it is confirmed whether the current determination area isthe same as the previous determination area. If the determination areais the same as the previous determination area, the process moves tostep S1108, whereas if the determination area is a differentdetermination area, the process moves to step S1109. In step S1108, thecurrent stay-unit, in which the current measurement result of the humanbody being processed is reflected, is returned to the value of theprevious stay-unit. As a result, the state is the same as if the staytime was not measured. In step S1109, the values of the previousstay-unit and the current stay-unit for the human body being processedare both deleted. As a result, the stay time in the determination areais not measured for the human body who is just passing through thedetermination area.

Partial changes to the flowchart of FIG. 4 corresponding to the presentembodiment will be described next. In the following, only the processesof the present embodiment that are different from those in the firstembodiment will be described. Other parts have already been described inthe first embodiment and will therefore be omitted here.

In step S404, a speed determination process is carried out in additionto the processing described in the first embodiment. In the speeddetermination process, the movement speed of the human body isdetermined on the basis of the position information of the human bodyfound by the human body tracking unit 204 in the current image to beprocessed and the image to be processed immediately previous, and thetime information of each image to be processed. The determined movementspeed is held in the auxiliary storage unit 123. Next, in step S405, theinside/outside area determination unit 205 carries out theinside/outside area determination on the basis of the result ofcomparing the movement speed of the human body with the threshold, inaddition to the process described in the first embodiment. Specifically,if the movement speed is less than or equal to the threshold, themovement speed is treated as being slow. The human body is determined tobe staying within the determination area in question, and is determinedto be inside the determination area. However, if the movement speed ofthe human body is not less than or equal to the threshold, the movementspeed is high. The human body is determined to have passed through thedetermination area in question, and is determined to be outside thedetermination area.

Next, in step S406, the stay time measurement unit 206 obtains the timeinformation based on the capturing time of each image, theidentification information of the human body, and the inside/outsidearea determination result, which are held in the auxiliary storage unit123. The stay time measurement unit 206 generates the current stay-unitby updating the previous stay-unit through the same process as thatdescribed in the first embodiment. At this time, the generated currentstay-unit is not written over the previous stay-unit, but is insteadstored separately in the auxiliary storage unit 123. The previousstay-unit and the current stay-unit that have been stored are updated,deleted, or the like according to the flow of the processing of FIG. 11.

In this manner, when the movement speed of the human body is less thanor equal to the threshold, it is determined that the human body isstaying within the determination area in question, and the stay time ismeasured. However, if the movement speed of the human body is not lessthan or equal to the threshold, the human body is determined to havepassed through the determination area in question, and the stay time inthe determination area in question is not measured.

Although the foregoing described determining whether or not the humanbody has passed through the determination area on the basis of themovement speed of the human body, the determination need not depend onthe movement speed. For example, the distance over which the human bodyhas moved between frames may be found. Then, if the movement distance isless than or equal to a threshold, the human body may be determined tobe staying in that area, whereas if the movement distance is greaterthan the threshold, the human body may be determined to be passingthrough.

According to the present embodiment as described thus far, the stay-unitcan be adjusted when the human body is passing through a determinationarea. Specifically, a movement speed threshold is provided, and if thespeed is less than or equal to the threshold, the human body is treatedas being in the determination area, and the stay time is measured. Ifthe speed is higher than the threshold, the human body is determined tobe passing through and therefore outside the determination area, and thetime is therefore treated as if the human body was outside thedetermination area. Thus when the human body has simply passed through adetermination area, that human body's stay time can be effectivelyprevented from being measured. Specifying the reception area or the likewhere the person was actually helped is easier as a result.

Although exemplary embodiments have been described above, theembodiments are not intended to be limited to the descriptions therein,and many variations and alterations are possible within the scopethereof.

Other Embodiments

Embodiments of the invention can also be realized by a computer of asystem or apparatus that reads out and executes computer executableinstructions (e.g., one or more programs) recorded on a storage medium(which may also be referred to more fully as a ‘non-transitorycomputer-readable storage medium’) to perform the functions of one ormore of the above-described embodiments and/or that includes one or morecircuits (e.g., application specific integrated circuit (ASIC)) forperforming the functions of one or more of the above-describedembodiments, and by a method performed by the computer of the system orapparatus by, for example, reading out and executing the computerexecutable instructions from the storage medium to perform the functionsof one or more of the above-described embodiments and/or controlling theone or more circuits to perform the functions of one or more of theabove-described embodiments. The computer may comprise one or moreprocessors (e.g., central processing unit (CPU), micro processing unit(MPU)) and may include a network of separate computers or separateprocessors to read out and execute the computer executable instructions.The computer executable instructions may be provided to the computer,for example, from a network or the storage medium. The storage mediummay include, for example, one or more of a hard disk, a random-accessmemory (RAM), a read only memory (ROM), a storage of distributedcomputing systems, an optical disk (such as a compact disc (CD), digitalversatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, amemory card, and the like.

While the invention has been described with reference to exemplaryembodiments, it is to be understood that the invention is not limited tothe disclosed exemplary embodiments. The scope of the following claimsis to be accorded the broadest interpretation so as to encompass allsuch modifications and equivalent structures and functions.

This application claims the benefit of Japanese Patent Application No.2018-228322 filed on Dec. 5, 2018 which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An information processing apparatus comprising: asetting unit configured to set a plurality of areas for detecting anobject in a moving image; a detection unit configured to analyze themoving image and detect an object; a determination unit configured todetermine a stay time for which the object has stayed within the area onthe basis of a result of detecting the object in the moving image; aspecifying unit configured to, when the same object has been detected ina plurality of the areas by the detection unit, specify an area, amongthe plurality of areas, to be associated with the stay time, on thebasis of a predetermined condition; and an output unit configured tooutput information in which the area specified by the specifying unitand the stay time are associated with each other.
 2. The informationprocessing apparatus according to claim 1, wherein the determinationunit determines the stay time on an area-by-area basis; and thespecifying unit specifies the area, among the plurality of areas, inwhich the stay time is the longest, as the area to be associated withthe stay time.
 3. The information processing apparatus according toclaim 1, further comprising: a counting unit configured to count thenumber of times the object has stayed within the area on the basis of aresult of detecting the object in the moving image, wherein thespecifying unit specifies the area, among the plurality of areas, forwhich the number counted by the counting unit is the highest, as thearea to be associated with the stay time.
 4. The information processingapparatus according to claim 1, wherein the stay time included in theinformation output by the output unit is a stay time obtained bytotaling the stay time of the object in each of the plurality of areas.5. The information processing apparatus according to claim 1, whereinthe stay time included in the information output by the output unit isthe stay time of the object in the area specified by the specifyingunit.
 6. The information processing apparatus according to claim 1,wherein the determination unit determines the stay time on the basis ofthe amount of time from when the object is first detected within thearea to when the object is last detected in the area.
 7. The informationprocessing apparatus according to claim 1, further comprising: amovement speed specifying unit configured to specify the speed at whichthe object moved in the area on the basis of a result of detecting theobject in the moving image, wherein the specifying unit specifies thearea, among the plurality of areas, for which the movement speed of theobject when moving in the area is less than or equal to a threshold, asthe area to be associated with the stay time.
 8. The informationprocessing apparatus according to claim 7, wherein the determinationunit determines the stay time after the movement speed of the objectwhen moving in the area has become less than or equal to the threshold.9. The information processing apparatus according to claim 1, furthercomprising: an obtainment unit configured to obtain the moving imagefrom an image capturing device including an image capturing unitconfigured to capture the moving image.
 10. A method of controlling aninformation processing apparatus, the method comprising: setting aplurality of areas for detecting an object in a moving image; analyzingthe moving image and detecting an object; determining a stay time forwhich the object has stayed within the area on the basis of a result ofdetecting the object in the moving image; when the same object has beendetected in a plurality of the areas in the detecting, specifying anarea, among the plurality of areas, to be associated with the stay time,on the basis of a predetermined condition; and outputting information inwhich the area specified in the specifying and the stay time areassociated with each other.
 11. A non-transitory computer-readablestorage medium in which is stored a program for causing a computer tofunction as: a setting unit configured to set a plurality of areas fordetecting an object in a moving image; a detection unit configured toanalyze the moving image and detect an object; a determination unitconfigured to determine a stay time for which the object has stayedwithin the area on the basis of a result of detecting the object in themoving image; a specifying unit configured to, when the same object hasbeen detected in a plurality of the areas by the detection unit, specifyan area, among the plurality of areas, to be associated with the staytime, on the basis of a predetermined condition; and an output unitconfigured to output information in which the area specified by thespecifying unit and the stay time are associated with each other.